#include <iostream>
using namespace std;

//两个正整数的最大值

int Findmax(int x = 0, int y = 0)
{
	return x > y ? x : y;
}

int main()
{
	int num1 = 0;
	int num2 = 0;
	cout << "请输入两个整数：" << endl;
	cin >> num1>>num2;
	int max = Findmax(num1, num2);
	cout << "最大值为：" << max << endl;
	return 0;
}

//三个正整数的最大值

int Findmax(int x = 0, int y = 0, int z = 0)
{
	int max = 0;
	if (x > y && x > z)
	{
		max = x;
	}
	else if (y > x && y > z)
	{
		max = y;
	}
	else if (z > x && z > y)
	{
		max = z;
	}
	return max;
}

int main()
{
	int num1 = 0;
	int num2 = 0;
	int num3 = 0;
	cout << "请输入三个整数：" << endl;
	cin >> num1 >> num2 >> num3;
	int max = Findmax(num1, num2,num3);
	cout << "最大值为：" << max << endl;
	return 0;
}